x86/np2m: implement sharing of np2m between vCPUs
authorSergey Dyasli <sergey.dyasli@citrix.com>
Tue, 3 Oct 2017 15:21:02 +0000 (16:21 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 6 Oct 2017 12:36:43 +0000 (13:36 +0100)
commit6df4b481b0c52ef2d432c1b3d3657369be4c1ea3
treeacae1c6632d4702e12152c8d23d9b9a732ecd338
parenta65a24209cd81fa619097b09d7ede275f8a78bd2
x86/np2m: implement sharing of np2m between vCPUs

At the moment, nested p2ms are not shared between vcpus even if they
share the same base pointer.

Modify p2m_get_nestedp2m() to allow sharing a np2m between multiple
vcpus with the same np2m_base (L1 np2m_base value in VMCx12).

If the current np2m doesn't match the current base pointer, first look
for another nested p2m in the same domain with the same base pointer,
before reclaiming one from the LRU.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jun Nakajima <jun.nakajima@intel.com>
xen/arch/x86/hvm/vmx/vvmx.c
xen/arch/x86/mm/p2m.c